/**
 * 妙趣拾光锦盒客户端全局样式
 */

/* 全局样式 */
:root {
    --primary-color: #a370f7; /* 紫色 */
    --primary-light: #d6b7ff; /* 浅紫色 */
    --secondary-color: #ff9fc6; /* 粉色 */
    --secondary-light: #ffcfe0; /* 浅粉色 */
    --gradient-bg: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
    --gradient-btn: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #ff6b8b; /* 调整为粉红色系 */
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --box-shadow: 0 4px 12px rgba(163, 112, 247, 0.15);
    --transition: all 0.3s ease;
    --border-radius: 0.5rem;
}

body {
    font-family: 'Roboto', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--light-color);
    background-image: var(--gradient-bg);
    background-attachment: fixed;
}

main {
    flex: 1;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

/* 盲盒区域样式 */
.box-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    margin-bottom: 1.5rem;
    background-color: white;
}

.box-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
}

.box-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.box-card:hover .box-image {
    transform: scale(1.05);
}

.box-detail-image {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 1.5rem;
}

/* 盲盒动画样式 */
.draw-animation {
    perspective: 1000px;
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto;
}

.box-3d {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate-box 1.5s ease-in-out forwards;
}

.animation-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 200px;
    height: 220px;
    background: var(--gradient-bg);
    z-index: 9999;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
}

.animation-text {
    color: var(--primary-color);
    font-size: 14px;
    margin-top: 15px;
    text-align: center;
    font-weight: bold;
}

.box-face {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--gradient-btn);
    border: 2px solid #fff;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    backface-visibility: visible;
}

.box-front { transform: translateZ(75px); }
.box-back { transform: rotateY(180deg) translateZ(75px); }
.box-right { transform: rotateY(90deg) translateZ(75px); }
.box-left { transform: rotateY(-90deg) translateZ(75px); }
.box-top { transform: rotateX(90deg) translateZ(75px); }
.box-bottom { transform: rotateX(-90deg) translateZ(75px); }

@keyframes rotate-box {
    0% { transform: rotateY(0) rotateX(0); }
    25% { transform: rotateY(90deg) rotateX(0); }
    50% { transform: rotateY(180deg) rotateX(90deg); }
    75% { transform: rotateY(270deg) rotateX(180deg); }
    100% { transform: rotateY(360deg) rotateX(360deg); }
}

.result-animation {
    animation: pop-in 0.5s ease-in-out forwards;
    opacity: 0;
    transform: scale(0.8);
}

@keyframes pop-in {
    0% { opacity: 0; transform: scale(0.8); }
    60% { opacity: 1; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

/* 按钮样式 */
.btn {
    border-radius: 0.375rem;
    transition: var(--transition);
    font-weight: 500;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--gradient-btn);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color));
    border-color: var(--primary-color);
    box-shadow: 0 4px 8px rgba(163, 112, 247, 0.3);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--gradient-btn);
    color: #fff;
    border-color: var(--primary-color);
}

/* 导航栏 */
.navbar {
    background: white !important;
    box-shadow: 0 2px 15px rgba(163, 112, 247, 0.1);
}

.navbar .navbar-brand {
    color: var(--primary-color);
}

.navbar .nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 8px 16px rgba(163, 112, 247, 0.2);
}

/* 表单样式 */
.form-control, .form-select {
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ced4da;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-light);
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(163, 112, 247, 0.25);
}

/* 徽章样式 */
.badge {
    font-weight: 600;
    padding: 0.35em 0.65em;
    border-radius: 0.375rem;
}

/* 分页样式 */
.pagination .page-link {
    border-radius: 0.25rem;
    margin: 0 0.2rem;
    color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background: var(--gradient-btn);
    border-color: var(--primary-color);
    color: #fff;
}

/* 页脚样式 */
.footer {
    padding: 3rem 0;
    margin-top: 3rem;
    color: #6c757d;
    background-color: rgba(255, 255, 255, 0.9);
}

.footer a {
    color: #6c757d;
    transition: var(--transition);
}

.footer a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-buttons .btn {
        padding: 10px 20px;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .box-image {
        height: 150px;
    }
}

/* Logo盲盒动画 */
.logo-box-3d {
    perspective: 600px;
    width: 40px;
    height: 40px;
    position: relative;
    margin-right: 15px;
}

.logo-box {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate-logo-box 10s ease-in-out infinite;
    transform-origin: center center;
}

.logo-box-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: bold;
    color: white;
    backface-visibility: visible;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3) inset;
    border-radius: 4px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* 使用网站的主题色系 */
.logo-box-front { 
    transform: translateZ(20px);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}
.logo-box-back { 
    transform: rotateY(180deg) translateZ(20px);
    background: linear-gradient(45deg, var(--primary-light), var(--secondary-light));
}
.logo-box-right { 
    transform: rotateY(90deg) translateZ(20px);
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-light));
}
.logo-box-left { 
    transform: rotateY(-90deg) translateZ(20px);
    background: linear-gradient(45deg, var(--primary-light), var(--secondary-color));
}
.logo-box-top { 
    transform: rotateX(90deg) translateZ(20px);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-light));
}
.logo-box-bottom { 
    transform: rotateX(-90deg) translateZ(20px);
    background: linear-gradient(45deg, var(--secondary-light), var(--primary-color));
}

@keyframes rotate-logo-box {
    0% { transform: rotateY(0) rotateX(10deg); }
    25% { transform: rotateY(90deg) rotateX(-10deg); }
    50% { transform: rotateY(180deg) rotateX(10deg); }
    75% { transform: rotateY(270deg) rotateX(-10deg); }
    100% { transform: rotateY(360deg) rotateX(10deg); }
} 